//    Copyright (C) Kherty.  All rights reserved.
using OpenLS.Core.Serialization;

namespace OpenLS.Spreadsheet
{
    static class DifferentialStyleRecordHelper
    {
        internal static DifferentialStyleRecord GetDifferentialStyleRecord(ReadContext ss, int? id)
        {
            if (id == null)
                return null;
            var l = ss.GetData<DifferentialStyleRecordResolver>();
            return l[id.Value];
        }
        internal static void SetDifferentialStyleRecord(WriteContext context, DifferentialStyleRecord r, string name)
        {
            if (r == null)
                return;

            context.SetInteger(name, context.GetData<WriteObjectTable<DifferentialStyleRecord>>()[r]);

        }


    }
}